﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
using System.Configuration;

namespace SFast.Web
{
    /// <summary>
    /// 操作webconfig
    /// </summary>
    public static class WebConfigOperation
    {
        /// <summary>
        /// 获取标签ConnectionStrings的值
        /// </summary>
        /// <param name="name"></param>
        /// <returns></returns>
        public static String GetConnectionStrings(String name)
        {
            return ConfigurationManager.ConnectionStrings[name].ToString();
        }

        /// <summary>
        /// 获取标签AppSettings的值
        /// </summary>
        /// <param name="name"></param>
        /// <returns></returns>
        public static String GetAppSettings(String name)
        {
            return ConfigurationManager.AppSettings[name].ToString();
        }
    }
}
